import Content from '@/sheep/layouts/content.vue';
import { request } from '@/sheep/request';

const route = {
  path: 'user',
  name: 'shop.admin.user',
  component: Content,
  meta: {
    title: '',
  },
  children: [
    {
      path: 'couponList',
      name: 'shop.admin.user.couponList',
      component: () => import('@/app/shop/admin/user/couponList.vue'),
      meta: {
        title: '优惠券领取记录',
      },
    },
  ],
};

const api = {
  share: (id, params) =>
    request({
      url: `shop/admin/share/${id}`,
      method: 'GET',
      params,
    }),
  coupon: (id, params) =>
    request({
      url: `shop/admin/user/coupon/${id}`,
      method: 'GET',
      params,
    }),
  couponList: (id, params) =>
    request({
      url: `shop/admin/user/coupon/couponList/${id}`,
      method: 'GET',
      params
    }),
};

export { route, api };
